{{define "get/GetIP.html"}}
<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <title>查询IP</title>
  </head>

  <!--<style type="text/css">
    *{
      -webkit-user-select: auto;
    }
  </style> -->

  <body>
    Your IP:   <span id="content">{{.clientip}}</span>
    <button id="copyBT">复制</button>
    <script>
      function copyArticle(event) {
        const range = document.createRange();
        range.selectNode(document.getElementById('content'));

        const selection = window.getSelection();
        if(selection.rangeCount > 0) selection.removeAllRanges();
        selection.addRange(range);
        document.execCommand('copy');
        alert("复制成功！");
      }

      document.getElementById('copyBT').addEventListener('click', copyArticle, false);
    </script>
  </body>

</html>

{{end}}